<?php
// //获取域名或主机地址 
// echo $_SERVER['HTTP_HOST']."<br>"; #localhost
// //获取网页地址 
// echo $_SERVER['PHP_SELF']."<br>"; #/blog/testurl.php
// //获取网址参数 
// echo $_SERVER["QUERY_STRING"]."<br>"; #id=5

// echo $_SERVER["QUERY_STRING"]."<br>";

$case=$_SERVER["QUERY_STRING"];
$case=$case.'';
// 
//判断重定向;
if($_SERVER['PHP_SELF']=='/list.php'){
    header('HTTP/1.1 301 Moved Permanently');
    switch($case){
        case 'catid=38':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/News.html');
            break;
        case 'catid=39':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Distributors.html');
            break;
        case 'catid=40':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Support.html');
            break;
        case 'catid=70':
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Products.html');
            break;
        default:
            header('Location:http://'.$_SERVER['HTTP_HOST'].'/Products.html');
    }
}